package com.young.springdemo.service.component;

public class ImageFile extends Component {
    private String name;

    public ImageFile(String name) {
        this.name = name;
    }

    @Override
    public void add(Component component) {
        System.out.println("文件内容,无法新增");
    }

    @Override
    public void remove(Component component) {
        System.out.println("文件内容,无法删除");
    }

    @Override
    public Component get(int i) {
        System.out.println("文件内容,无法获取");
        return null;
    }

    @Override
    public void killVirus() {
        System.out.println("开始对图片"+name+"文件进行杀毒");
    }
}
